<!DOCTYPE html>
<html>
{include file="public/head" /}
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="callout callout-title">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4>{$nav.title}</h4>
                {notempty name="nav.remark"}
                <p>{$nav.remark}</p>
                {/notempty}
</div>  
<div class="panel-body">
<div class="panel-tool">
<div class="row">
              <div class="col-md-6 col-sm-6 col-xs-12 mb15">
                <div id="toolbar" class="toolbar">
                <a href="{:url('index')}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a href="{:url('add')}" data-name="添加连接" class="btn btn-success btn-add btn-editone" data-width="100%" data-height="100%" data-offset="0px"><i class="fa fa-plus"></i> 添加</a> <a  href="{:url('status',array('status'=>1))}" form="#list" class="confirm btn btn-info btn-disabled  ajax-post disabled"><i class="fa fa-unlock"></i> 启用</a> <a  href="{:url('status',array('status'=>0))}" form="#list" class="confirm btn btn-warning btn-disabled  ajax-post disabled"><i class="fa fa-lock"></i> 禁用</a> <a  href="{:url('del')}" form="#list" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a><span id="selectedChks">已选择<strong></strong>记录</span>
                </div>
                <!-- /.toolbar -->
              </div>


            </div>

</div>
<!-- /.panel-tool -->
    <div class="tab-content" id="contents">
              <form id="list" method="post">
              <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                  <thead>
                    <tr style="height:45px;">
                                  <th style="text-align:center;vertical-align: middle; width:5%"> <label class="pretty success">
                <input type="checkbox" id="checkall" class="delcheckall">
                <label><i class="mdi mdi-check"></i></label>
                </label>
              </th>
                    <th style="text-align:center;vertical-align: middle;">任务ID</th>
                    <th style="text-align:center;vertical-align: middle;">任务名称</th>
                    <th style="text-align:center;vertical-align: middle;" class="hidden-xs">任务描述</th>
                    <th style="text-align:center;vertical-align: middle;">任务类型</th>
                    <th style="text-align:center;vertical-align: middle;">任务状态</th>
                    <th style="text-align:center;vertical-align: middle;" class="hidden-xs">执行时间</th>
                    <th style="text-align:center;vertical-align: middle;">执行地址</th>
                    <th style="text-align:center;vertical-align: middle;">操作</th>
                    </tr>
                 </thead>                
               <tbody>
               {notempty name="list"} 
              {volist name="list" id="vo"}
               <tr>   
              <td class="bs-checkbox" style="text-align:center;vertical-align:middle; font-size:14px"><label class="pretty success">
              <input type="checkbox" name="id[]" value="{$vo['timming_id']}" id="checkbox">
              <label><i class="mdi mdi-check"></i></label>
              </label></td> 
                  <td align="center">{$vo.timming_id}</td>     
                  <td align="center">{$vo.timming_name}</td>
                  <td align="center" class="hidden-xs">{$vo.timming_remark}</td>
                  <td align="center">{eq name="vo.timming_type" value="1"}采集{else/}生成{/eq}</td>
                  <td align="center">{eq name="vo.timming_status" value="1"} <a class="btn btn-info btn-xs btn-facebook ajax-post" href="{:url('status',array('id'=> $vo['timming_id'],'status'=>0))}">启用</a>{else /}<a class="btn btn-info btn-xs btn-danger ajax-post" href="{:url('status',array('id'=> $vo['timming_id'],'status'=>1))}">禁用</a>{/eq}</td>
                   <td align="center" class="hidden-xs">{$vo.timming_uptime|date='Y-m-d H:i:s',###}</td>
                  <td align="center"><a href="{:zanpian_api_url('timming/index',array('tid'=>$vo['timming_id'],'pwd'=>$vo['timming_password']))}" target="_blank" class="btn btn-success btn-xs">WIN系统地址</a>
                {eq name="vo.timming_type" value="1"}
                 <a href="javascript:;" data-content="{volist name=":timming_url($vo,array('os'=>$i))" id="url"}采集地址{$i}：{:$url}<br>{/volist}
                 {notempty name="vo.timming_htmlaction"}<br>生成地址：{:parse_str($vo['timming_htmlaction'],$cation)}{:zanpian_api_url('timming/create',array_merge($cation,['tid'=>$vo['timming_id'],'pwd'=>$vo['timming_password'],'os'=>1]),true,true)}{/notempty}"  class="btn btn-success btn-add btn-xs liunx_url" >LIUNX地址</a>{else/}{:parse_str($vo['timming_htmlaction'],$cation)}<a target="_blank" href="{:zanpian_api_url('timming/create',array_merge($cation,['tid'=>$vo['timming_id'],'pwd'=>$vo['timming_password'],'os'=>1]),true,true)}" target="_blank" class="btn btn-success btn-xs">LIUNX地址</a>{/eq}</td>
                                    
                  <td align="center"> <a href="{:url('edit',array('id'=>$vo.timming_id))}"  data-name="编辑" class="btn btn-success btn-editone btn-xs" data-width="100%" data-height="100%" data-offset="0px"><i class="fa fa-pencil"></i> 编辑</a> <a href="{:url('del',array('id'=>$vo.timming_id))}" class="confirm btn btn-danger btn-xs confirm ajax-post"><i class="fa fa-trash-o"></i> 删除</a></td>  
                  
              </tr>
{/volist} 
                {else/}<tr><td align="center" colspan="7" >抱歉，没有找到相关备份文件！</td></tr>{/notempty}
            </tbody>
                </table>
              </form>
            </div>
         </div>
         <!-- /.panel-body --> 
        </div>
        </div>
        </section>
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function() {
	zanpian.cms.all();
	$(document).on('click', ".liunx_url", function() {
		$content = $(this).attr('data-content');
		layer.open({
			type: 1,
			anim: 2,
			offset: '50px',
			title: 'liunx定时地址',
			area: ['auto', 'auto'],
			skin: 'layui-layer-rim',
			//加上边框
			content: '<div style="padding:30px 50px;font-size:14px;"><p style="text-align:center">将下列地址分段复制后添加到计划任务</p><p style="text-align:left">' + $content + '</p></div>'
		});


	})
});
</script>
</body>
</html>
